package com.cloud.pole.shop.biz.goods;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.cloud.pole.common.biz.BaseBiz;
import com.cloud.pole.mapper.goods.ShopGoodsGroupGoodsMapper;
import com.cloud.pole.shop.model.entity.goods.ShopGoodsGroupGoods;

@Service
@Transactional(rollbackFor = Exception.class)
public class ShopGoodsGroupGoodsBiz extends BaseBiz<ShopGoodsGroupGoodsMapper, ShopGoodsGroupGoods>{

	public void insertGroup(ShopGoodsGroupGoods shopGoodsGroupGoods) {
		mapper.addShopsGroup(shopGoodsGroupGoods);
	}
	
	public List<ShopGoodsGroupGoods> selectByGoodsId(Integer goodsId){
		return mapper.selectByGoodsGroupId(goodsId);
	};
	
	public void deleteShopGoods(Integer goodsId) {
		mapper.deleteByGoodsGroupId(goodsId);
	}
}
